package com.automannn.seataSamples.stock.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;

/**
 * @author automannn
 * @Date 2022/3/24
 * @Description 库存数据持久化对象
 */
@Data
@TableName("t_stock")
public class StockPO extends Model<StockPO> {
    private static final long serialVersionUID = 1L;

    /**
     * 库存编码
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 商品编号
     */
    private String commodityCode;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 库存数量
     */
    private String count;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
